home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / status.h,v < prev    next >
Encoding:
Text File  |  1992-09-21  |  13.6 KB  |  520 lines

  1. head     1.15;
  2. branch   ;
  3. access   ;
  4. symbols  sprited:1.13.1;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.15
  10. date     92.09.21.16.40.57;  author mgbaker;  state Exp;
  11. branches ;
  12. next     1.14;
  13.  
  14. 1.14
  15. date     92.09.15.15.07.02;  author mgbaker;  state Exp;
  16. branches ;
  17. next     1.13;
  18.  
  19. 1.13
  20. date     91.06.07.12.44.02;  author jhh;  state Exp;
  21. branches 1.13.1.1;
  22. next     1.12;
  23.  
  24. 1.12
  25. date     91.05.08.18.21.20;  author mgbaker;  state Exp;
  26. branches ;
  27. next     1.11;
  28.  
  29. 1.11
  30. date     90.09.11.14.40.15;  author kupfer;  state Exp;
  31. branches ;
  32. next     1.10;
  33.  
  34. 1.10
  35. date     90.03.26.12.12.21;  author mgbaker;  state Exp;
  36. branches ;
  37. next     1.9;
  38.  
  39. 1.9
  40. date     90.03.22.12.52.03;  author shirriff;  state Exp;
  41. branches ;
  42. next     1.8;
  43.  
  44. 1.8
  45. date     89.09.06.12.52.20;  author mgbaker;  state Exp;
  46. branches ;
  47. next     1.7;
  48.  
  49. 1.7
  50. date     89.08.31.13.41.15;  author mgbaker;  state Exp;
  51. branches ;
  52. next     1.6;
  53.  
  54. 1.6
  55. date     89.08.31.13.10.00;  author ouster;  state Exp;
  56. branches ;
  57. next     1.5;
  58.  
  59. 1.5
  60. date     89.01.16.09.26.57;  author ouster;  state Exp;
  61. branches ;
  62. next     1.4;
  63.  
  64. 1.4
  65. date     88.08.02.12.37.48;  author douglis;  state Exp;
  66. branches ;
  67. next     1.3;
  68.  
  69. 1.3
  70. date     88.08.01.15.07.33;  author ouster;  state Exp;
  71. branches ;
  72. next     1.2;
  73.  
  74. 1.2
  75. date     88.06.21.13.09.45;  author ouster;  state Exp;
  76. branches ;
  77. next     1.1;
  78.  
  79. 1.1
  80. date     88.06.21.13.06.01;  author ouster;  state Exp;
  81. branches ;
  82. next     ;
  83.  
  84. 1.13.1.1
  85. date     91.08.05.22.45.47;  author kupfer;  state Exp;
  86. branches ;
  87. next     ;
  88.  
  89.  
  90. desc
  91. @@
  92.  
  93.  
  94. 1.15
  95. log
  96. @New return code.
  97. @
  98. text
  99. @/*
  100.  * status.h --
  101.  *
  102.  *     Define the statuses that are returned from modules.
  103.  *
  104.  *    The fields of a status value are defined in the following way:
  105.  *
  106.  *    MSB                  LSB
  107.  *    +--------+----------+----------+
  108.  *    |Pub/Priv| Module # | Message #|
  109.  *    +--------+----------+----------+
  110.  *      1 bit    15 bits     16 bits
  111.  *
  112.  *    The Pub/Priv bit if 0 is used to specify that the status is
  113.  *        public and can be used by other modules.
  114.  *    The Pub/Priv bit if 1 is used to specify that the status is
  115.  *        private and can not be used by other modules.
  116.  *    The module and message numbers are used to index the message array.
  117.  *
  118.  * Copyright 1986, 1988 Regents of the University of California
  119.  * Permission to use, copy, modify, and distribute this
  120.  * software and its documentation for any purpose and without
  121.  * fee is hereby granted, provided that the above copyright
  122.  * notice appear in all copies.  The University of California
  123.  * makes no representations about the suitability of this
  124.  * software for any purpose.  It is provided "as is" without
  125.  * express or implied warranty.
  126.  *
  127.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.14 92/09/15 15:07:02 mgbaker Exp Locker: mgbaker $ SPRITE (Berkeley)
  128.  */
  129.  
  130. #ifndef _STATUS
  131. #define _STATUS
  132.  
  133. #ifndef _ASM
  134.  
  135. #ifndef _SPRITE
  136. #include <sprite.h>
  137. #endif
  138.  
  139. extern char *Stat_GetMsg _ARGS_((ReturnStatus status));
  140. extern char *Stat_GetPrivateMsg();
  141. extern void Stat_PrintMsg _ARGS_((ReturnStatus status, char *string));
  142.  
  143. /*
  144.  * STAT_IS_PRIVATE is TRUE if the status value is private and
  145.  *     is FALSE if the status is public.
  146.  */
  147.  
  148. #define STAT_IS_PRIVATE(status)    ((status) & 0x80000000)
  149. #define STAT_MODULE(status)    (((status)& 0x7fffffff) >> 16)
  150. #define STAT_MSGNUM(status)    ((status) & 0x0000FFFF)
  151.  
  152. /*
  153.  * stat_LastError contains the result of the last failed system call (some
  154.  * library functions may also alter its value).
  155.  */
  156. extern ReturnStatus    stat_LastError;
  157. extern void           Stat_SetErrorHandler();
  158. extern void           Stat_SetErrorData();
  159. extern void        Stat_GetErrorHandler();
  160. extern ReturnStatus    Stat_Error();
  161.  
  162. /*
  163.  * The procedures below are used to map between Sprite and UNIX
  164.  * error numbers, for the interim period before Sprite converts
  165.  * over to using UNIX error numbers.
  166.  */
  167.  
  168. extern int        Compat_MapCode _ARGS_((ReturnStatus status));
  169. extern ReturnStatus    Compat_MapToSprite _ARGS_((int unixErrno));
  170. #endif /* _ASM */
  171.  
  172. /*---------------------------------------------*/
  173.  
  174. /*    gen.stat    */
  175. #define GEN_SUCCESS                            0x00000000
  176. #define GEN_FAILURE                            0x00000001
  177. #define GEN_ABORTED_BY_SIGNAL                  0x00000002
  178. #define GEN_NO_PERMISSION                      0x00000003
  179. #define GEN_NOT_IMPLEMENTED                    0x00000004
  180. #define GEN_INVALID_ARG                        0x00000005
  181. #define GEN_TIMEOUT                            0x00000006
  182. #define GEN_EPERM                            0x00000007
  183. #define GEN_ENOENT                            0x00000008
  184. #define GEN_EINTR                            0x00000009
  185. #define GEN_E2BIG                            0x0000000a
  186. #define GEN_EAGAIN                            0x0000000b
  187. #define GEN_EACCES                            0x0000000c
  188. #define GEN_EFAULT                            0x0000000d
  189. #define GEN_EEXIST                            0x0000000e
  190. #define GEN_EINVAL                            0x0000000f
  191. #define GEN_EFBIG                            0x00000010
  192. #define GEN_ENOSPC                            0x00000011
  193. #define GEN_ERANGE                            0x00000012
  194. #define GEN_EIDRM                            0x00000013
  195.  
  196. /*    proc.stat    */
  197. #define PROC_BAD_FILE_NAME                      0x00010000
  198. #define PROC_BAD_AOUT_FORMAT                    0x00010001
  199. #define PROC_NO_SEGMENTS                        0x00010002
  200. #define PROC_CHILD_PROC                         0x00010003
  201. #define PROC_NO_EXITS                           0x00010004
  202. #define PROC_INVALID_PID                        0x00010005
  203. #define PROC_UID_MISMATCH                       0x00010006
  204. #define PROC_NO_CHILDREN                        0x00010007
  205. #define PROC_INVALID_FAMILY_ID                  0x00010008
  206. #define PROC_NOT_SET_ENVIRON_VAR                0x00010009
  207. #define PROC_BAD_ENVIRON_STRING                 0x0001000a
  208. #define PROC_ENVIRON_FULL                       0x0001000b
  209. #define PROC_INVALID_NODE_ID                    0x0001000c
  210. #define PROC_MIGRATION_REFUSED                  0x0001000d
  211. #define PROC_INVALID_STRING                     0x0001000e
  212. #define PROC_NO_STACKS                          0x0001000f
  213. #define PROC_NO_PEER                            0x00010010
  214.  
  215. /*    sys.stat    */
  216. #define SYS_ARG_NOACCESS                       0x00020000
  217. #define SYS_INVALID_ARG                        0x00020001
  218. #define SYS_INVALID_SYSTEM_CALL                0x00020002
  219.  
  220. /*    rpc.stat    */
  221. #define RPC_INVALID_ARG                        0x00030000
  222. #define RPC_NO_CHANNELS                        0x00030001
  223. #define RPC_TIMEOUT                            0x00030002
  224. #define RPC_TOO_MANY_ACKS                      0x00030003
  225. #define RPC_INTERNAL_ERROR                     0x00030004
  226. #define RPC_INVALID_RPC                        0x00030005
  227. #define RPC_NULL_ERROR                         0x00030006
  228. #define RPC_PARAMS_TOOBIG                      0x00030007
  229. #define RPC_DATA_TOOBIG                        0x00030008
  230. #define RPC_NO_REPLY                           0x00030009
  231. #define RPC_SERVICE_DISABLED                   0x0003000a
  232. #define    RPC_NACK_ERROR                0x0003000b
  233. #define    RPC_FS_NO_PREFIX            0x0003000c
  234.  
  235. /*    fs.stat    */
  236. #define FS_NO_ACCESS                          0x00040000
  237. #define FS_INVALID_ARG                        0x00040001
  238. #define FS_REMOTE_OP_INVALID                  0x00040002
  239. #define FS_LOCAL_OP_INVALID                   0x00040003
  240. #define FS_DEVICE_OP_INVALID                  0x00040004
  241. #define FS_NEW_ID_TOO_BIG                     0x00040005
  242. #define FS_MASTER_CLOSED                      0x00040006
  243. #define FS_BROKEN_PIPE                        0x00040007
  244. #define FS_NO_DISK_SPACE                      0x00040008
  245. #define FS_LOOKUP_REDIRECT                    0x00040009
  246. #define FS_NO_HANDLE                          0x0004000a
  247. #define FS_NEW_PREFIX                         0x0004000b
  248. #define FS_FILE_NOT_FOUND                     0x0004000c
  249. #define FS_WOULD_BLOCK                        0x0004000d
  250. #define FS_BUFFER_TOO_BIG                     0x0004000e
  251. #define FS_IS_DIRECTORY                       0x0004000f
  252. #define FS_NOT_DIRECTORY                      0x00040010
  253. #define FS_NOT_OWNER                          0x00040011
  254. #define FS_STALE_HANDLE                       0x00040012
  255. #define FS_FILE_EXISTS                        0x00040013
  256. #define FS_DIR_NOT_EMPTY                      0x00040014
  257. #define FS_NAME_LOOP                          0x00040015
  258. #define FS_CROSS_DOMAIN_OPERATION             0x00040016
  259. #define FS_TIMEOUT                            0x00040017
  260. #define FS_NO_SHARED_LOCK                     0x00040018
  261. #define FS_NO_EXCLUSIVE_LOCK                  0x00040019
  262. #define FS_WRONG_TYPE                         0x0004001a
  263. #define FS_FILE_REMOVED                       0x0004001b
  264. #define FS_FILE_BUSY                          0x0004001c
  265. #define FS_BAD_SEEK                           0x0004001d
  266. #define FS_DOMAIN_UNAVAILABLE                 0x0004001e
  267. #define FS_VERSION_MISMATCH                   0x0004001f
  268. #define FS_NOT_CACHEABLE                      0x00040020
  269. #define FS_NO_REFERENCE                      0x00040021
  270. #define FS_RECOV_SKIP                          0x00040022
  271.  
  272. /*    vm.stat    */
  273. #define VM_WRONG_SEG_TYPE                     0x00050000
  274. #define VM_SEG_TOO_LARGE                      0x00050001
  275. #define VM_SHORT_READ                         0x00050002
  276. #define VM_SHORT_WRITE                        0x00050003
  277. #define VM_SWAP_ERROR                         0x00050004
  278. #define VM_NO_SEGMENTS                        0x00050005
  279.  
  280. /*    sig.stat    */
  281. #define SIG_INVALID_SIGNAL                     0x00060000
  282. #define SIG_INVALID_ACTION                     0x00060001
  283.  
  284. /*    dev.stat    */
  285. #define DEV_DMA_FAULT                          0x00070000
  286. #define DEV_INVALID_UNIT                       0x00070001
  287. #define DEV_TIMEOUT                            0x00070002
  288. #define DEV_OFFLINE                            0x00070003
  289. #define DEV_HANDSHAKE_ERROR                    0x00070004
  290. #define DEV_RETRY_ERROR                        0x00070005
  291. #define DEV_NO_DEVICE                          0x00070006
  292. #define DEV_INVALID_ARG                        0x00070007
  293. #define DEV_HARD_ERROR                         0x00070008
  294. #define DEV_END_OF_TAPE                        0x00070009
  295. #define DEV_NO_MEDIA                           0x0007000a
  296. #define DEV_EARLY_CMD_COMPLETION               0x0007000b
  297. #define DEV_NO_SENSE                           0x0007000c
  298. #define DEV_BLANK_CHECK                        0x0007000d
  299. #define DEV_BUSY                0x0007000e
  300. #define DEV_RESET                0x0007000f
  301.  
  302. /*    net.stat    */
  303. #define NET_UNREACHABLE_NET                    0x00080000
  304. #define NET_UNREACHABLE_HOST                   0x00080001
  305. #define NET_CONNECT_REFUSED                    0x00080002
  306. #define NET_CONNECTION_RESET                   0x00080003
  307. #define NET_NO_CONNECTS                        0x00080004
  308. #define NET_ALREADY_CONNECTED                  0x00080005
  309. #define NET_NOT_CONNECTED                      0x00080006
  310. #define NET_ADDRESS_IN_USE                     0x00080007
  311. #define NET_ADDRESS_NOT_AVAIL                  0x00080008
  312. #define NET_BAD_PROTOCOL                       0x00080009
  313. #define NET_BAD_OPERATION                      0x0008000a
  314. #define NET_BAD_OPTION                         0x0008000b
  315.  
  316.  
  317. /*---------------------------------------------*/
  318.  
  319. #endif /* _STATUS */
  320. @
  321.  
  322.  
  323. 1.14
  324. log
  325. @New status.
  326. @
  327. text
  328. @d29 1
  329. a29 1
  330.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.13 91/06/07 12:44:02 jhh Exp Locker: mgbaker $ SPRITE (Berkeley)
  331. d172 1
  332. @
  333.  
  334.  
  335. 1.13
  336. log
  337. @added DEV_RESET status
  338. @
  339. text
  340. @d29 1
  341. a29 1
  342.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.12 91/05/08 18:21:20 mgbaker Exp Locker: jhh $ SPRITE (Berkeley)
  343. d171 1
  344. @
  345.  
  346.  
  347. 1.13.1.1
  348. log
  349. @Branch for Sprite server.
  350. @
  351. text
  352. @d29 1
  353. a29 1
  354.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.13 91/06/07 12:44:02 jhh Exp $ SPRITE (Berkeley)
  355. @
  356.  
  357.  
  358. 1.12
  359. log
  360. @New prefix return code.
  361. @
  362. text
  363. @d29 1
  364. a29 1
  365.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.11 90/09/11 14:40:15 kupfer Exp Locker: mgbaker $ SPRITE (Berkeley)
  366. d200 1
  367. @
  368.  
  369.  
  370. 1.11
  371. log
  372. @Use function prototypes.
  373. @
  374. text
  375. @d29 1
  376. a29 1
  377.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.10 90/03/26 12:12:21 mgbaker Exp Locker: kupfer $ SPRITE (Berkeley)
  378. d135 1
  379. @
  380.  
  381.  
  382. 1.10
  383. log
  384. @Added new RPC_NACK_ERROR to return if a nack should imply ramping
  385. down client use of channels.
  386. @
  387. text
  388. @d29 1
  389. a29 1
  390.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.9 90/03/22 12:52:03 shirriff Exp Locker: mgbaker $ SPRITE (Berkeley)
  391. d41 1
  392. a41 1
  393. extern char *Stat_GetMsg();
  394. d43 1
  395. a43 1
  396. extern void Stat_PrintMsg();
  397. d70 2
  398. a71 2
  399. extern int        Compat_MapCode();
  400. extern ReturnStatus    Compat_MapToSprite();
  401. @
  402.  
  403.  
  404. 1.9
  405. log
  406. @Mary checking this in for Ken.
  407. @
  408. text
  409. @d29 1
  410. a29 1
  411.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.8 89/09/06 12:52:20 mgbaker Exp Locker: shirriff $ SPRITE (Berkeley)
  412. d134 1
  413. @
  414.  
  415.  
  416. 1.8
  417. log
  418. @More _ASM stuff.
  419. @
  420. text
  421. @d29 1
  422. a29 1
  423.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.7 89/08/31 13:41:15 mgbaker Exp Locker: mgbaker $ SPRITE (Berkeley)
  424. d84 13
  425. @
  426.  
  427.  
  428. 1.7
  429. log
  430. @Added new #ifndef _ASM so that the file can be included from assembly
  431. source files.
  432. @
  433. text
  434. @d29 1
  435. a29 1
  436.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.6 89/08/31 13:10:00 ouster Exp Locker: mgbaker $ SPRITE (Berkeley)
  437. d35 2
  438. a40 1
  439. #ifndef _ASM
  440. @
  441.  
  442.  
  443. 1.6
  444. log
  445. @DEV_BUSY status added.
  446. @
  447. text
  448. @d29 1
  449. a29 1
  450.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.5 89/01/16 09:26:57 ouster Exp $ SPRITE (Berkeley)
  451. d39 1
  452. d71 1
  453. @
  454.  
  455.  
  456. 1.5
  457. log
  458. @Define Compat_MapCode and Compat_MapToSprite here.
  459. @
  460. text
  461. @d29 1
  462. a29 1
  463.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.4 88/08/02 12:37:48 douglis Exp Locker: ouster $ SPRITE (Berkeley)
  464. d181 1
  465. d200 1
  466. a200 1
  467. #endif _STATUS
  468. @
  469.  
  470.  
  471. 1.4
  472. log
  473. @added PROC_NO_PEER, from libc/status.h
  474. @
  475. text
  476. @d29 1
  477. a29 1
  478.  * $Header: status.h,v 1.3 88/08/01 15:07:33 ouster Exp $ SPRITE (Berkeley)
  479. d61 9
  480. @
  481.  
  482.  
  483. 1.3
  484. log
  485. @Include sprite.h if it isn't there already.
  486. @
  487. text
  488. @d29 1
  489. a29 1
  490.  * $Header: status.h,v 1.2 88/06/21 13:09:45 ouster Exp $ SPRITE (Berkeley)
  491. d90 1
  492. @
  493.  
  494.  
  495. 1.2
  496. log
  497. @*** empty log message ***
  498. @
  499. text
  500. @d29 1
  501. a29 1
  502.  * $Header: status.h,v 1.1 88/06/21 13:06:01 ouster Exp $ SPRITE (Berkeley)
  503. d34 4
  504. @
  505.  
  506.  
  507. 1.1
  508. log
  509. @Initial revision
  510. @
  511. text
  512. @d20 8
  513. a27 2
  514.  * Copyright 1986 Regents of the University of California
  515.  * All rights reserved.
  516. d29 1
  517. a29 1
  518.  * $Header: status.h.head,v 2.1 87/08/21 08:17:44 ouster Exp $ SPRITE (Berkeley)
  519. @
  520.